home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / ifl / iflPixel.z / iflPixel
Encoding:
Text File  |  2002-10-03  |  8.7 KB  |  265 lines

  1.  
  2.  
  3.  
  4. iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))       IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll        iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      iiiiffffllllPPPPiiiixxxxeeeellll - class for pixel abstraction
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      This is a base class and therefore has no inheritance.
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <ifl/iflPixel.h>
  16.  
  17. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.      This class abstracts the concept of a pixel of image data.  It contains
  19.      the data type, the number of channels, and a list of component values.
  20.      Pixels are used as arguments on an iflConverter constructor.
  21.  
  22. CCCCLLLLAAAASSSSSSSS MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN SSSSUUUUMMMMMMMMAAAARRRRYYYY
  23.      CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr
  24.  
  25.           iflPixel(iflDataType type=iflDataType(0), int nc=0, void* data=NULL)
  26.           iflPixel(const iflPixel &pix)
  27.  
  28.  
  29.  
  30.      IIIInnnniiiittttiiiiaaaalllliiiizzzziiiinnnngggg
  31.  
  32.           void convert(const iflPixel& pix, iflDataType toType, int nc=0,
  33.                          int* chanList=NULL)
  34.           void operator=(const iflPixel &pix)
  35.           void set(iflDataType type, int nc=0, void* data = NULL)
  36.  
  37.  
  38.      MMMMeeeemmmmbbbbeeeerrrr aaaacccccccceeeessssssss
  39.  
  40.           void* getData() const
  41.           iflDataType getDataType() const
  42.           double getElem(int index) const
  43.           int getNumChans() const
  44.           void setElem(double elemValue, int index=0)
  45.           double min() const
  46.           double max() const
  47.  
  48.  
  49.      CCCCoooonnnnvvvveeeennnniiiieeeennnncccceeee ooooppppeeeerrrraaaattttoooorrrrssss
  50.  
  51.           double operator[](int index) const
  52.           int operator==(const iflPixel &p)
  53.           int operator!=(const iflPixel &p)
  54.  
  55.  
  56. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  57.      iiiiffffllllPPPPiiiixxxxeeeellll(((())))
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))       IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll        iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))
  71.  
  72.  
  73.  
  74.           iflPixel(iflDataType type=iflDataType(0), int nc=0, void* data=NULL)
  75.           iflPixel(const iflPixel &pix)
  76.  
  77.  
  78.           The first constructor creates a pixel of data type, _t_y_p_e, with _n_c
  79.           channels, and with the component values pointed to by _d_a_t_a.  The
  80.           data values are copied into the iflPixel constructed.  The second
  81.           constructor copies the attributes and data from the iflPixel
  82.           specified by _p_i_x.  By default, a pixel of undefined type with no
  83.           components is constructed.
  84.  
  85.  
  86.      ccccoooonnnnvvvveeeerrrrtttt(((())))
  87.  
  88.           void convert(const iflPixel& pix, iflDataType toType, int nc=0,
  89.                     int* chanList=NULL)
  90.  
  91.  
  92.           This function copies the pixel specified by _p_i_x, converting to the
  93.           new data type, _t_o_T_y_p_e.  A subset of the channels can be selected by
  94.           listing the channels to copy from the source pixel in _c_h_a_n_L_i_s_t.  The
  95.           length of the channel list is given by _n_c.
  96.  
  97.      ggggeeeettttDDDDaaaattttaaaa(((())))
  98.  
  99.           void* getData() const
  100.  
  101.  
  102.           This function returns a pointer to the pixel component array.  This
  103.           is identical in function to the ((((vvvvooooiiiidddd****)))) cast operation.
  104.  
  105.      ggggeeeettttDDDDaaaattttaaaaTTTTyyyyppppeeee(((())))
  106.  
  107.           iflDataType getDataType() const
  108.  
  109.  
  110.           This function returns the data type of the pixel.
  111.  
  112.      ggggeeeettttEEEElllleeeemmmm(((())))
  113.  
  114.           double getElem(int index) const
  115.  
  116.  
  117.           This function returns the pixel component selected by _i_n_d_e_x.  The
  118.           first component is at index zero.  This is identical in function to
  119.           the [[[[]]]] subscript operation.
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))       IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll        iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))
  137.  
  138.  
  139.  
  140.      ggggeeeettttNNNNuuuummmmCCCChhhhaaaannnnssss(((())))
  141.  
  142.           int getNumChans() const
  143.  
  144.  
  145.           This function returns the number of channels in the pixel.
  146.  
  147.      mmmmiiiinnnn(((())))
  148.  
  149.           double min() const
  150.  
  151.  
  152.           This function returns the minimum value of the pixel component
  153.           array.
  154.  
  155.      mmmmaaaaxxxx(((())))
  156.  
  157.           double max() const
  158.  
  159.  
  160.           This function returns the maximum value of the pixel component
  161.           array.
  162.  
  163.      ooooppppeeeerrrraaaattttoooorrrr[[[[]]]]
  164.  
  165.           double operator[](int index) const
  166.  
  167.  
  168.           This function returns the pixel component selected by _i_n_d_e_x.  The
  169.           first component is at index zero.  This is identical in function to
  170.           the ggggeeeettttEEEElllleeeemmmm(((()))) function.
  171.  
  172.      ooooppppeeeerrrraaaattttoooorrrr====(((())))
  173.  
  174.           void operator=(const iflPixel &pix)
  175.  
  176.  
  177.           The assignment operator makes a copy of the right hand pixel, _p_i_x,
  178.           in the left hand pixel.  The new copy retains the same data type,
  179.           number of channels, and data values.
  180.  
  181.      ooooppppeeeerrrraaaattttoooorrrr========(((())))
  182.  
  183.           int operator==(const iflPixel &p)
  184.  
  185.  
  186.           This operator returns TRUE if 'this' iflPixel is the same as _p (
  187.           i.e. both have the same data type, number of channels and values );
  188.           FALSE otherwise.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))       IIIImmmmaaaaggggeeee FFFFoooorrrrmmmmaaaatttt LLLLiiiibbbbrrrraaaarrrryyyy CCCC++++++++ RRRReeeeffffeeeerrrreeeennnncccceeee MMMMaaaannnnuuuuaaaallll        iiiiffffllllPPPPiiiixxxxeeeellll((((3333))))
  203.  
  204.  
  205.  
  206.      ooooppppeeeerrrraaaattttoooorrrr!!!!====(((())))
  207.  
  208.           int operator!=(const iflPixel &p)
  209.  
  210.  
  211.           This operator returns TRUE if 'this' iflPixel is not the same as _p (
  212.           i.e. they differ in the data type, number of channels or values );
  213.           FALSE otherwise.
  214.  
  215.      sssseeeetttt(((())))
  216.  
  217.           void set(iflDataType type, int nc=0, void* data = NULL)
  218.  
  219.  
  220.           This function initializes the pixel's data type to _t_y_p_e, sets the
  221.           channel count to _n_c, and copies the component values from _d_a_t_a.
  222.  
  223.      sssseeeettttEEEElllleeeemmmm(((())))
  224.  
  225.           void setElem(double elemValue, int index=0)
  226.  
  227.  
  228.           This function sets the pixel component selected by _i_n_d_e_x.  The first
  229.           component is at index zero.
  230.  
  231. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  232.      iflConverter
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.